package com.ssh.service;

import java.util.List;

import com.ssh.dao.IOntologyFileDAO;
import com.ssh.model.OntologyFile;




public class OntologyFileService implements IOntologyFileService {
	private IOntologyFileDAO ontologyFileDAO = null;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.ssh.service.IOrdersService#addOrders(com.ssh.model.Orders)
	 */
	/* (non-Javadoc)
	 * @see com.ssh.service.IOntologyFileService#addOntologyFile(com.ssh.model.OntologyFile)
	 */
	public void addOntologyFile(OntologyFile f) {
		ontologyFileDAO.save(f);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.ssh.service.IOrdersService#delOrders(com.ssh.model.Orders)
	 */
	/* (non-Javadoc)
	 * @see com.ssh.service.IOntologyFileService#delOntologyFile(com.ssh.model.OntologyFile)
	 */
	public void delOntologyFile(OntologyFile f) {
		ontologyFileDAO.delete(f);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.ssh.service.IOrdersService#findAll()
	 */
	/* (non-Javadoc)
	 * @see com.ssh.service.IOntologyFileService#findAll()
	 */
	public List<OntologyFile> findAll() {
		return ontologyFileDAO.findAll();
	}
	public List<OntologyFile> findOntologyFileByUsername(String ownerName) {
		return ontologyFileDAO.findByOwnerName(ownerName);
	}
	public OntologyFile findOntologyFileById(Integer id){
		return ontologyFileDAO.findById(id);
	}
	public IOntologyFileDAO getOntologyFileDAO() {
		return ontologyFileDAO;
	}

	public void setOntologyFileDAO(IOntologyFileDAO ontologyFileDAO) {
		this.ontologyFileDAO = ontologyFileDAO;
	}

   
}
